package cn.young.javalearning.designpattern.singleton.hungry;

/**
 * 饿汉模式
 */
public class HungrySingleton {
    private static final HungrySingleton HUNGRY_SINGLETON = new HungrySingleton();

    private HungrySingleton(){}

    public static final HungrySingleton getInstance(){
        return HUNGRY_SINGLETON;
    }

    public void test(Integer integer){
        System.out.println("this is hungry singleton pattern!" + integer);
    }
}
